Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 2, 2025

Adds integration test coverage for the GetOrchestrationHistoryAsync method as requested in #516.

Test Coverage

  • Completed orchestration: Verifies history contains expected events (ExecutionStartedEvent, ExecutionCompletedEvent, EventRaisedEvent) with correct data
  • Non-existent orchestration: Verifies ArgumentException is thrown with appropriate message

Test Host Enhancements

To support these tests, enhanced StreamInstanceHistory in the test sidecar:

  • InMemoryOrchestrationService.TryGetOrchestrationHistory — retrieves history from instance store for completed orchestrations
  • TaskHubGrpcServer.StreamInstanceHistory — now checks streaming cache first, falls back to instance store, throws NotFound when instance doesn't exist
[Fact]
public async Task GetOrchestrationHistoryAsync_CompletedOrchestration_ReturnsHistoryEvents()
{
    // ... setup orchestration and complete it ...
    
    IList<HistoryEvent> history = await server.Client.GetOrchestrationHistoryAsync(instanceId, cts.Token);
    
    history.Should().Contain(e => e is ExecutionStartedEvent);
    history.Should().Contain(e => e is ExecutionCompletedEvent);
}

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] WIP address feedback on API to get orchestration history Add integration tests for GetOrchestrationHistoryAsync Dec 2, 2025
Copilot AI requested a review from sophiatev December 2, 2025 21:31
Copilot finished work on behalf of sophiatev December 2, 2025 21:31
@sophiatev sophiatev closed this Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants